﻿#include "../DirectUI/HnrjitImaging.h"
#include "../DirectUI/HnrjitManager.h"
#include "../DirectUI/HnrjitContainer.h"
#include "../DirectUI/HnrjitControl.h"

class CMainDialog : public CHnrjitManager
{
public:
	virtual BOOL OnInitDialog()
	{
		CHnrjitManager::OnInitDialog();

		return TRUE;
	}

	virtual void OnClicked(CHnrjitContainer* pContainer, CHnrjitControl* pControl)
	{
		pControl->SetEnabled(!pControl->IsEnabled());
	}
};

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nShowCmd)
{
	CHnrjitImaging::ImagingInitialize();

	CMainDialog* manager = new CMainDialog;
	manager->LoadFromFile(_T("DemoApp.xml"));
	manager->DoModal(0);

	CHnrjitImaging::ImagingUninitialize();

	return 0;
}